POV-Ray : Newsgroups : povray.general : Constructing a solid tetrahedron by 4 triangles : Constructing a solid tetrahedron by 4 triangles Server Time
30 Jul 2024 12:25:15 EDT (-0400)
  Constructing a solid tetrahedron by 4 triangles  
From: Amir ni
Date: 5 Feb 2009 07:45:01
Message: <web.498adf1b1f5de9ab792c7d270@news.povray.org>
Hi friends, I wanna make a solid tetrahedron using 4 triangles. I am using the
following code, but the object's inside is empty (I noticed it, when I used
difference command to subtract 4 spheres from the tetrahedron.


This is the code I am using:



//---------------------------------------
global_settings {  assumed_gamma 1.0 }

#include "colors.inc"

//---------------------------------------
camera{ ultra_wide_angle
        angle 75
        right x*image_width/image_height
     location  <2 , 3 , -4>
        look_at   <0,0,0> }
//---------------------------------------
light_source{ <0,0,-2500>
              color rgb<1,1,1> }
//---------------------------------------
background {color  rgb<1,1,1>}
//---------------------------------------

#declare d =1.05;



difference{

 object{
  union {
   triangle { < 1,  1,  1>,  <-1,  1, -1>,  < 1, -1, -1> }
   triangle { <-1,  1, -1>,  <-1, -1,  1>,  < 1, -1, -1> }
   triangle { < 1,  1,  1>,  < 1, -1, -1>,  <-1, -1,  1> }
   triangle { < 1,  1,  1>,  <-1, -1,  1>,  <-1,  1, -1> }
  }
  pigment{ color rgb<1,0,0> }
 }


 sphere { < 1,  1,  1> , d}
 sphere { <1,  -1, -1> ,  d}
 sphere {  < -1,  1,  -1> ,  d}
 sphere { <  -1,  -1,  1> ,  d}

}


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.